package jaux.tank.bean.vo.front;

public class JSONRets {


	public static final Integer SUCCESS_CODE = Rets.SUCCESS_CODE;
	public static final Integer FAILURE_CODE = Rets.FAILURE_CODE;

	private JSONRets() {}
	
	public static <T> JSONRet<T> success(T data) {
		return new JSONRet<>(JSONRets.SUCCESS_CODE, "成功", data);
	}

	public static <T> JSONRet<T> failure(String msg) {
		return new JSONRet<>(JSONRets.FAILURE_CODE, msg, null);
	}

	public static <T> JSONRet<T> success() {
		return new JSONRet<>(JSONRets.SUCCESS_CODE, "成功", null);
	}
}
